10. The displayMessage Method

The displayMessage Method

Question:

Start Quiz:

Solution:

INSTRUCTOR NOTE:

The end goal should look something like this:

End Goal

In the activity_main.xml layout:

  1. Change PRICE label to ORDER SUMMARY
  2. Change the TextView for price value to have an ID of @+id/order_summary_text_view.

In MainActivity.java, in the displayMessage(String message) method:

  1. Change variable name from priceTextView to orderSummaryTextView.
  2. Change R.id.price_text_view to R.id.order_summary_text_view.

In MainActivity.java:

  1. Remember to delete the displayPrice() method because we don’t need that anymore.